package com.trainsmart.smartmvc
{
	import flash.events.Event;
	
	import mx.rpc.events.FaultEvent;

	public class Model implements IModel
	{
		private var _VO:Class;
		public function Model(VO:Class)
		{
			_VO = VO;
		}

		public function save(vo:*, func:Function=null, resultHandler:Event=null, faultHandler:FaultEvent=null):void
		{
			
		}
		
		public function update(vo:*, func:Function=null, resultHandler:Event=null, faultHandler:FaultEvent=null):void
		{
		}
		
		public function remove(vo:*, func:Function=null, resultHandler:Event=null, faultHandler:FaultEvent=null):void
		{
		}
		
		public function findById(Id:*, func:Function=null, resultHandler:Event=null, faultHandler:FaultEvent=null):void
		{
		}
		
		public function findByProperties(args:Array, func:Function=null, resultHandler:Event=null, faultHandler:FaultEvent=null):void
		{
		}
		
		public function checkVO(vo:*):void
		{
			if(!(vo is _VO)) throw new Error("Error in vo type");
		}
		
	}
}